package org.sword.wechat4j.api.request.message;

import org.sword.wechat4j.api.bean.material.Media;
import org.sword.wechat4j.api.bean.msg.TextMsg;
import org.sword.wechat4j.api.bean.msg.WxCard;
import org.sword.wechat4j.api.request.ApiRequest;
import org.sword.wechat4j.api.response.message.MsgInfo;

import java.util.List;

/**
 * 群发接口(根据open_id集合发送，服务号认证可用)
 * Created by sean on 2016-07-20-0020.
 */
public final class Cgi_binMessageMassSendPost extends ApiRequest<MsgInfo> {

    private List<String> touser;
    private String msgtype;

    private TextMsg text;
    private Media mpnews;
    private Media voice;
    private Media image;
    private Media mpvideo;
    private WxCard wxcard;

    public List<String> getTouser() {
        return touser;
    }

    public void setTouser(List<String> touser) {
        this.touser = touser;
    }

    public Media getMpnews() {
        return mpnews;
    }

    public void setMpnews(Media mpnews) {
        this.msgtype = "mpnews";
        this.mpnews = mpnews;
    }

    public String getMsgtype() {
        return msgtype;
    }

    public void setMsgtype(String msgtype) {
        this.msgtype = msgtype;
    }

    public TextMsg getText() {
        return text;
    }

    public void setText(TextMsg text) {
        this.msgtype = "text";
        this.text = text;
    }

    public Media getVoice() {
        return voice;
    }

    public void setVoice(Media voice) {
        this.msgtype = "voice";
        this.voice = voice;
    }

    public Media getImage() {
        return image;
    }

    public void setImage(Media image) {
        this.msgtype = "image";
        this.image = image;
    }

    public Media getMpvideo() {
        return mpvideo;
    }

    public void setMpvideo(Media mpvideo) {
        this.msgtype = "mpvideo";
        this.mpvideo = mpvideo;
    }

    public WxCard getWxcard() {
        return wxcard;
    }

    public void setWxcard(WxCard wxcard) {
        this.msgtype = "wxcard";
        this.wxcard = wxcard;
    }
}
